﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace test1
{
    public class Diren
    {
        string name;
        int dengji;
        int xueliang;
        public int Dengji { get { return dengji; } set { dengji = value; }  }
        public int Xueliang { get { return xueliang; } set { xueliang = value ; }  }
        public string Name { set; get; }
        public Diren(string n) {
            Name = n;
            Dengji = 1;
            Xueliang = 100; 
            Console.WriteLine("姓名："+Name +"\n"+"等级："+Dengji +"\n"+"血量："+Xueliang);
        }
        public void Hanjiao()
        {
            Console.WriteLine("此路是我开，哪里走！");
        }
        public virtual void Gongji()
        {
            Console.WriteLine("我发起了普通攻击。");
        }
    }
}
